<template>
  <div id="app">
   <!-- <router-link to="/">首页</router-link> |
   <router-link to="/about">关于</router-link> |
   <router-link to="/login" v-if="!isLogin">登录</router-link>
   <a v-if="isLogin" @click="logout">注销</a> -->

       <router-view></router-view>
 

    <v-bottom-nav
      :active.sync="bottomNav"
      :value="true"
      color="transparent"
      fixed
    >
      <v-btn
        color="teal"
        flat
        value="/"
      >
        <span>首页</span>
        <v-icon>home</v-icon>
      </v-btn>

      <v-btn
        color="teal"
        flat
        value="/cart"
      >
        <span>购物车</span>
         <v-icon>shopping_cart</v-icon>
      </v-btn>

      <v-btn
        color="teal"
        flat
        value="/about"
      >
        <span>我的</span>
        <v-icon>account_circle</v-icon>
      </v-btn>
    </v-bottom-nav>

  </div>
</template>

<script>


export default {
  name: 'app',
  data() {
    return {
      bottomNav: "/"
    }
  },
  components: {
    
  }
}
</script>
<script>
import { mapGetters } from 'vuex'
export default {
  methods: {
     logout() {
     this.$http.get('/api/logout')
    }
  },
  computed: {
      ...mapGetters(['isLogin'])
   
  },
}
</script>

<style>
#app {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}
.v-item-group.v-bottom-nav{
  position: fixed;
  left: 0;
  bottom: 0;
}
</style>
